package cn.jinjimi.domain.data.net;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Url;

/**
 *
 * @author zhenhua
 * @date 16/7/20
 */
public interface FileService {

    @POST
    @Multipart
    Call<ResponseBody> upload(@Url String url,
                              @Part List<MultipartBody.Part> parts);

    @POST("file/{token}")
    @Multipart
    Call<ResponseBody> uploadFile(@Path("token") String token,
                                  @Part List<MultipartBody.Part> parts);

}
